package com.ph.irp.base.usermanage.service;

import java.util.List;
import java.util.Map;

import com.ph.irp.dto.FunctionDTO;
import com.ph.irp.model.PBasePurviewRole;
import com.ph.irp.model.PBasePurviewUser;

public interface UserManageService {

	public List<PBasePurviewUser> getAllUser()throws Throwable;
	
	public List<PBasePurviewUser> getAllUserExcludeCurrentUserID(int userID)throws Throwable;
	
	public List<PBasePurviewRole> getAllUserGroup()throws Throwable;

	public List<PBasePurviewUser> getUserListByUserName(String userName)throws Throwable;

	public List<PBasePurviewUser> getUserListByUserNameExcludeCurrentUserID(String userName,int userID)throws Throwable;
	
	
	public List<PBasePurviewRole> getUserGroupListByRoleName(String roleName)throws Throwable;

	public void addUser(PBasePurviewUser user)throws Throwable;

	public void addUserGroup(PBasePurviewRole role)throws Throwable;

	public void addUserRole(String[] userIDs, int roleID)throws Throwable;

	public PBasePurviewUser getUserByUserId(String userId)throws Throwable;

	public PBasePurviewRole getRoleByRoleId(String roleId)throws Throwable;

	public List<PBasePurviewUser> getUserRoleByRoleId(String roleId,int userId)throws Throwable;

	public List<PBasePurviewUser> getUserRoleNotByRoleId(String roleId,int userId)throws Throwable;

	public void editUser(PBasePurviewUser user)throws Throwable;

	public void editUserRole(PBasePurviewRole role)throws Throwable;

	public void deleteUser(String deleteIds) throws Throwable;

	public void deleteUserGroup(String deleteIds)throws Throwable;

	public int getRoleIdByRoleNameAndDesc(String roleName, String roleDesc)throws Throwable;

	public void deleteUserRole(int roleId)throws Throwable;

	public List<Integer> getFunctionByRoleID(String roleID)throws Throwable;

	@SuppressWarnings("unchecked")
	public Map getFunctionType()throws Throwable;

	public void editUserPurview(String editFunctionTypeID,
			String editUserGroupID)throws Throwable;
	
	public List<FunctionDTO> getFunctionTypeByGroupID(String roleID) throws Throwable;
	public List<FunctionDTO> getAllFunctionType() throws Throwable ;
	
	public List<FunctionDTO> getFunctionTypeByFunctionTypeID(String functionTypeID) throws Throwable;
	public String getFunctionTypeDescByFunctionTypeName(String functionTypeName) throws Throwable;
	public List<FunctionDTO> getAllFunctionTypeByFunctionTypeID() throws Throwable;
	public String getFunctionTypeNameByFunctionTypeID(String functionTypeID) throws Throwable;
	public List<Integer> getUserRoleByUserId(String userId) throws Throwable;
}
